<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>疑问解答</h2>
        <ol class="breadcrumb">
            <li>
                <a href="#">首页</a>
            </li>

            <li class="active">
                <strong>疑问解答</strong>
            </li>
        </ol>
    </div>

</div>

<div class="wrapper wrapper-content animated fadeInRight ecommerce">

    <div class="ibox-content m-b-sm border-bottom" id="form1">
        <div class="row">
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label" for="username">姓名</label>
                    <input type="text" id="username" name="username" placeholder="姓名"
                           class="form-control">
                </div>
            </div>
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label" for="telephone">联系电话</label>
                    <input type="text" id="telephone" name="telephone" placeholder="联系电话"
                           class="form-control">
                </div>
            </div>
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label">状态</label>
                    {:W('parts/op',['name'=>'status','key'=>'qs','value'=>''])}
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-sm-6">

            </div>
            <div class="col-sm-6 text-right">
                <button class="btn btn-default" data-op="reset">
                    <i class="fa fa-refresh"></i>
                    <span class="bold">重置</span>
                </button>
                &nbsp;
                &nbsp;
                <button class="btn btn-primary" data-op="search">
                    <i class="fa fa-search"></i>
                    <span class="bold">查询</span>
                </button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" id="footable">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function () {
        YFootTable.create('#footable', {
            baseUrl: "{:U('QuestionAnswer/')}",
            searchForm: '#form1',
            order:'desc',
            sort:'status asc,id',
            columns: [
                {name: 'username', title: '姓名', sortable: true}
                , {name: 'telephone', title: '联系电话', sortable: true, breakpoints: 'xs sm md'}
                , {name: 'qs__status', title: '状态', sortable: true, breakpoints: 'xs sm md'}
                , {name: 'question', title: '问题内容', sortable: true, breakpoints: 'xs sm md lg'}
                , {name: 'answer', title: '回复内容', sortable: true, breakpoints: 'xs sm md lg'}
                , {name: 'question_time', title: '提问时间', sortable: true, breakpoints: 'xs sm md'}
                , {name: 'answer_time', title: '回复时间', sortable: true, breakpoints: 'xs sm md'}
            ],
            actions: ['view', 'edit:回复', 'remove']
        });
    });
</script>